﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SSE657.BahMap.Common
{
    public class RateDataOrderByRateComparer : IComparer<RateData>
    {
        public int Compare(RateData x, RateData y)
        {            
            double result = x.Rate - y.Rate; // could be -1 < x < 1

            if (result < 0)
                return -1;
            if (result > 0)
                return 1;

            return 0;
        }
    }
}
